home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 6 / QRZ Ham Radio Callsign Database - Volume 6.iso / pc / files / dsp / dspkgctr.z / dspkgctr / gcc / rtlanal.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-08  |  16.1 KB  |  698 lines

  1. /* Analyze RTL for C-Compiler
  2.    Copyright (C) 1987, 1988 Free Software Foundation, Inc.
  3.  
  4.    $Id: rtlanal.c,v 1.4 91/04/01 09:55:49 jeff Exp $
  5.  
  6. This file is part of GNU CC.
  7.  
  8. GNU CC is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 1, or (at your option)
  11. any later version.
  12.  
  13. GNU CC is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. GNU General Public License for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with GNU CC; see the file COPYING.  If not, write to
  20. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  21.  
  22.  
  23. #include "config.h"
  24. #include "rtl.h"
  25.  
  26. extern void note_stores ();
  27.  
  28. /* Return 1 if the value of X is unstable
  29.    (would be different at a different point in the program).
  30.    The frame pointer, arg pointer, etc. are considered stable
  31.    (within one function) and so is anything marked `unchanging'.  */
  32.  
  33. int
  34. rtx_unstable_p (x)
  35.      rtx x;
  36. {
  37.   register RTX_CODE code = GET_CODE (x);
  38.   register int i;
  39.   register char *fmt;
  40.  
  41.   if (code == MEM)
  42.     return ! RTX_UNCHANGING_P (x);
  43.  
  44.   if (code == QUEUED)
  45.     return 1;
  46.  
  47.   if (code == CONST || code == CONST_INT)
  48.     return 0;
  49.  
  50.   if (code == REG)
  51.     return ! (REGNO (x) == FRAME_POINTER_REGNUM
  52.           || REGNO (x) == ARG_POINTER_REGNUM
  53.           || RTX_UNCHANGING_P (x));
  54.  
  55.   fmt = GET_RTX_FORMAT (code);
  56.   for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
  57.     if (fmt[i] == 'e')
  58.       if (rtx_unstable_p (XEXP (x, i)))
  59.     return 1;
  60.   return 0;
  61. }
  62.  
  63. /* Return 1 if X has a value that can vary even between two
  64.    executions of the program.  0 means X can be compared reliably
  65.    against certain constants or near-constants.
  66.    The frame pointer and the arg pointer are considered constant.  */
  67.  
  68. int
  69. rtx_varies_p (x)
  70.      rtx x;
  71. {
  72.   register RTX_CODE code = GET_CODE (x);
  73.   register int i;
  74.   register char *fmt;
  75.  
  76.   if (code == MEM)
  77.     return 1;
  78.  
  79.   if (code == QUEUED)
  80.     return 1;
  81.  
  82.   if (code == CONST || code == CONST_INT)
  83.     return 0;
  84.  
  85.   if (code == REG)
  86.     return ! (REGNO (x) == FRAME_POINTER_REGNUM
  87.           || REGNO (x) == ARG_POINTER_REGNUM);
  88.  
  89.   fmt = GET_RTX_FORMAT (code);
  90.   for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
  91.     if (fmt[i] == 'e')
  92.       if (rtx_varies_p (XEXP (x, i)))
  93.     return 1;
  94.   return 0;
  95. }
  96.  
  97. /* Return 1 if X refers to a memory location whose address 
  98.    cannot be compared reliably with constant addresses,
  99.    or if X refers to a BLKmode memory object.  */
  100.  
  101. int
  102. rtx_addr_varies_p (x)
  103.      rtx x;
  104. {
  105.   register enum rtx_code code;
  106.   register int i;
  107.   register char *fmt;
  108.  
  109.   if (x == 0)
  110.     return 0;
  111.  
  112.   code = GET_CODE (x);
  113.   if (code == MEM)
  114.     return GET_MODE (x) == BLKmode || rtx_varies_p (XEXP (x, 0));
  115.  
  116.   fmt = GET_RTX_FORMAT (code);
  117.   for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
  118.     if (fmt[i] == 'e')
  119.       if (rtx_addr_varies_p (XEXP (x, i)))
  120.     return 1;
  121.   return 0;
  122. }
  123.  
  124. /* Nonzero if register REG appears somewhere within IN.
  125.    Also works if REG is not a register; in this case it checks
  126.    for a subexpression of IN that is Lisp "equal" to REG.  */
  127.  
  128. int
  129. reg_mentioned_p (reg, in)
  130.      register rtx reg, in;
  131. {
  132.   register char *fmt;
  133.   register int i;
  134.   register enum rtx_code code;
  135.  
  136.   if (in == 0)
  137.     return 0;
  138.  
  139.   if (reg == in)
  140.     return 1;
  141.  
  142.   code = GET_CODE (in);
  143.  
  144.   switch (code)
  145.     {
  146.       /* Compare registers by number.  */
  147.     case REG:
  148.       return GET_CODE (reg) == REG && REGNO (in) == REGNO (reg);
  149.  
  150.       /* These codes have no constituent expressions
  151.      and are unique.  */
  152.     case CC0:
  153.     case PC:
  154.       return 0;
  155.  
  156.     case CONST_INT:
  157.       return GET_CODE (reg) == CONST_INT && INTVAL (in) == INTVAL (reg);
  158.     }
  159.  
  160.   if (GET_CODE (reg) == code && rtx_equal_p (reg, in))
  161.     return 1;
  162.  
  163.   fmt = GET_RTX_FORMAT (code);
  164.  
  165.   for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
  166.     {
  167.       if (fmt[i] == 'E')
  168.     {
  169.       register int j;
  170.       for (j = XVECLEN (in, i) - 1; j >= 0; j--)
  171.         if (reg_mentioned_p (reg, XVECEXP (in, i, j)))
  172.           return 1;
  173.     }
  174.       else if (fmt[i] == 'e'
  175.            && reg_mentioned_p (reg, XEXP (in, i)))
  176.     return 1;
  177.     }
  178.   return 0;
  179. }
  180.  
  181. /* Nonzero if register REG is used in an insn between
  182.    FROM_INSN and TO_INSN (exclusive of those two).  */
  183.  
  184. int
  185. reg_used_between_p (reg, from_insn, to_insn)
  186.      rtx reg, from_insn, to_insn;
  187. {
  188.   register rtx insn;
  189.   register RTX_CODE code;
  190.   for (insn = NEXT_INSN (from_insn); insn != to_insn; insn = NEXT_INSN (insn))
  191.     if (((code = GET_CODE (insn)) == INSN
  192.      || code == JUMP_INSN || code == CALL_INSN)
  193.     && reg_mentioned_p (reg, PATTERN (insn)))
  194.       return 1;
  195.   return 0;
  196. }
  197.  
  198. /* Nonzero if register REG is set or clobbered in an insn between
  199.    FROM_INSN and TO_INSN (exclusive of those two).
  200.    Does not notice increments, only SET and CLOBBER.  */
  201.  
  202. int
  203. reg_set_between_p (reg, from_insn, to_insn)
  204.      rtx reg, from_insn, to_insn;
  205. {
  206.   register rtx insn;
  207.   register RTX_CODE code;
  208.   for (insn = NEXT_INSN (from_insn); insn != to_insn; insn = NEXT_INSN (insn))
  209.     if (((code = GET_CODE (insn)) == INSN
  210.      || code == JUMP_INSN || code == CALL_INSN)
  211.     && reg_set_p (reg, PATTERN (insn)))
  212.       return 1;
  213.   return 0;
  214. }
  215.  
  216. /* Internals of reg_set_between_p.  */
  217.  
  218. static rtx reg_set_reg;
  219. static int reg_set_flag;
  220.  
  221. static void
  222. reg_set_p_1 (x)
  223.      rtx x;
  224. {
  225.   if (reg_overlap_mentioned_p (reg_set_reg, x))
  226.     reg_set_flag = 1;
  227. }
  228.  
  229. #if defined( DSP56000 ) || defined( DSP96000 )
  230. int
  231. #else
  232. static int
  233. #endif
  234. reg_set_p (reg, insn)
  235.      rtx reg, insn;
  236. {
  237.   reg_set_reg = reg;
  238.   reg_set_flag = 0;
  239.   note_stores (insn, reg_set_p_1);
  240.   return reg_set_flag;
  241. }
  242.  
  243. /* Return nonzero if hard register in range [REGNO, ENDREGNO)
  244.    appears either explicitly or implicitly in X
  245.    other than being stored into.
  246.  
  247.    References contained within the substructure at LOC do not count.
  248.    LOC may be zero, meaning don't ignore anything.  */
  249.  
  250. int
  251. refers_to_regno_p (regno, endregno, x, loc)
  252.      int regno, endregno;
  253.      rtx x;
  254.      rtx *loc;
  255. {
  256.   register int i;
  257.   register RTX_CODE code;
  258.   register char *fmt;
  259.  
  260.  repeat:
  261.   code = GET_CODE (x);
  262.   if (code == REG)
  263.     {
  264.       i = REGNO (x);
  265. #if defined( DSP56000 ) || defined( DSP96000 )
  266.       /* pseudo regs don't overlap in the same manner as hard ones. */
  267.       return (( endregno > i ) &&
  268.           ( regno < ( i + (( FIRST_PSEUDO_REGISTER > i ) ?
  269.                    HARD_REGNO_NREGS ( i, GET_MODE ( x )) : 1 ))));
  270. #else
  271.       return (endregno > i && regno < i + HARD_REGNO_NREGS (i, GET_MODE (x)));
  272. #endif
  273.     }
  274.  
  275.   if (code == SET)
  276.     {
  277.       /* Note setting a SUBREG counts as referring to the REG it is in!  */
  278.       if (GET_CODE (SET_DEST (x)) != REG
  279.       && refers_to_regno_p (regno, endregno, SET_DEST (x), loc))
  280.     return 1;
  281.       if (loc == &SET_SRC (x))
  282.     return 0;
  283.       x = SET_SRC (x);
  284.       goto repeat;
  285.     }
  286.  
  287.   if (code == CLOBBER)
  288.     {
  289.       if (GET_CODE (SET_DEST (x)) != REG
  290.       && refers_to_regno_p (regno, endregno, SET_DEST (x), loc))
  291.     return 1;
  292.       return 0;
  293.     }
  294.  
  295.   /* X does not match, so try its subexpressions.  */
  296.  
  297.   fmt = GET_RTX_FORMAT (code);
  298.   for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
  299.     {
  300.       if (fmt[i] == 'e' && loc != &XEXP (x, i))
  301.     {
  302.       if (i == 0)
  303.         {
  304.           x = XEXP (x, 0);
  305.           goto repeat;
  306.         }
  307.       else
  308.         if (refers_to_regno_p (regno, endregno, XEXP (x, i), loc))
  309.           return 1;
  310.     }
  311.       else if (fmt[i] == 'E')
  312.     {
  313.       register int j;
  314.       for (j = XVECLEN (x, i) - 1; j >=0; j--)
  315.         if (loc != &XVECEXP (x, i, j)
  316.         && refers_to_regno_p (regno, endregno, XVECEXP (x, i, j), loc))
  317.           return 1;
  318.     }
  319.     }
  320.   return 0;
  321. }
  322.  
  323. /* Nonzero if X contains any reg that overlaps hard register REG.  */
  324.  
  325. int
  326. reg_overlap_mentioned_p (reg, x)
  327.      rtx reg, x;
  328. {
  329.   int regno = REGNO (reg);
  330. #if defined( DSP56000 ) || defined( DSP96000 )
  331.   /* pseudo regs don't overlap as hard regs do. */
  332.   int endregno = ( regno < FIRST_PSEUDO_REGISTER ) ? 
  333.       regno + HARD_REGNO_NREGS ( regno, GET_MODE ( reg )) : regno + 1;
  334. #else
  335.   int endregno = regno + HARD_REGNO_NREGS (regno, GET_MODE (reg));
  336. #endif
  337.   return refers_to_regno_p (regno, endregno, x, 0);
  338. }
  339.  
  340. /* This is 1 until after reload pass.  */
  341. int rtx_equal_function_value_matters;
  342.  
  343. /* Return 1 if X and Y are identical-looking rtx's.
  344.    This is the Lisp function EQUAL for rtx arguments.  */
  345.  
  346. int
  347. rtx_equal_p (x, y)
  348.      rtx x, y;
  349. {
  350.   register int i;
  351.   register int j;
  352.   register enum rtx_code code;
  353.   register char *fmt;
  354.  
  355.   if (x == y)
  356.     return 1;
  357.   if (x == 0 || y == 0)
  358.     return 0;
  359.  
  360.   code = GET_CODE (x);
  361.   /* Rtx's of different codes cannot be equal.  */
  362.   if (code != GET_CODE (y))
  363.     return 0;
  364.  
  365.   /* (MULT:SI x y) and (MULT:HI x y) are NOT equivalent.
  366.      (REG:SI x) and (REG:HI x) are NOT equivalent.  */
  367.  
  368.   if (GET_MODE (x) != GET_MODE (y))
  369.     return 0;
  370.  
  371.   /* These three types of rtx's can be compared nonrecursively.  */
  372.   /* Until the end of reload,
  373.      don't consider the a reference to the return register of the current
  374.      function the same as the return from a called function.  This eases
  375.      the job of function integration.  Once the distinction no longer
  376.      matters, the insn will be deleted.  */
  377.   if (code == REG)
  378.     return (REGNO (x) == REGNO (y)
  379.         && (! rtx_equal_function_value_matters
  380.         || REG_FUNCTION_VALUE_P (x) == REG_FUNCTION_VALUE_P (y)));
  381.   if (code == LABEL_REF)
  382.     return XEXP (x, 0) == XEXP (y, 0);
  383.   if (code == SYMBOL_REF)
  384.     return XSTR (x, 0) == XSTR (y, 0);
  385.  
  386.   /* Compare the elements.  If any pair of corresponding elements
  387.      fail to match, return 0 for the whole things.  */
  388.  
  389.   fmt = GET_RTX_FORMAT (code);
  390.   for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
  391.     {
  392.       switch (fmt[i])
  393.     {
  394.     case 'i':
  395.       if (XINT (x, i) != XINT (y, i))
  396.         return 0;
  397.       break;
  398.  
  399.     case 'E':
  400.       /* Two vectors must have the same length.  */
  401.       if (XVECLEN (x, i) != XVECLEN (y, i))
  402.         return 0;
  403.  
  404.       /* And the corresponding elements must match.  */
  405.       for (j = 0; j < XVECLEN (x, i); j++)
  406.         if (rtx_equal_p (XVECEXP (x, i, j), XVECEXP (y, i, j)) == 0)
  407.           return 0;
  408.       break;
  409.  
  410.     case 'e':
  411.       if (rtx_equal_p (XEXP (x, i), XEXP (y, i)) == 0)
  412.         return 0;
  413.       break;
  414.  
  415.     case 's':
  416.       if (strcmp (XSTR (x, i), XSTR (y, i)))
  417.         return 0;
  418.       break;
  419.  
  420.     case 'u':
  421.       /* These are just backpointers, so they don't matter.  */
  422.       break;
  423.  
  424.     case '0':
  425.       break;
  426.  
  427.       /* It is believed that rtx's at this level will never
  428.          contain anything but integers and other rtx's,
  429.          except for within LABEL_REFs and SYMBOL_REFs.  */
  430.     default:
  431.       abort ();
  432.     }
  433.     }
  434.   return 1;
  435. }
  436.  
  437. /* Call FUN on each register or MEM that is stored into or clobbered by X.
  438.    (X would be the pattern of an insn).
  439.    FUN receives two arguments:
  440.      the REG, MEM, CC0 or PC being stored in or clobbered,
  441.      the SET or CLOBBER rtx that does the store.  */
  442.      
  443. void
  444. note_stores (x, fun)
  445.      register rtx x;
  446.      void (*fun) ();
  447. {
  448.   if ((GET_CODE (x) == SET || GET_CODE (x) == CLOBBER))
  449.     {
  450.       register rtx dest = SET_DEST (x);
  451.       while (GET_CODE (dest) == SUBREG
  452.          || GET_CODE (dest) == ZERO_EXTRACT
  453.          || GET_CODE (dest) == SIGN_EXTRACT
  454.          || GET_CODE (dest) == STRICT_LOW_PART)
  455.     dest = XEXP (dest, 0);
  456.       (*fun) (dest, x);
  457.     }
  458.   else if (GET_CODE (x) == PARALLEL)
  459.     {
  460.       register int i;
  461.       for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
  462.     {
  463.       register rtx y = XVECEXP (x, 0, i);
  464.       if (GET_CODE (y) == SET || GET_CODE (y) == CLOBBER)
  465.         {
  466.           register rtx dest = SET_DEST (y);
  467.           while (GET_CODE (dest) == SUBREG
  468.              || GET_CODE (dest) == ZERO_EXTRACT
  469.              || GET_CODE (dest) == SIGN_EXTRACT
  470.              || GET_CODE (dest) == STRICT_LOW_PART)
  471.         dest = XEXP (dest, 0);
  472.           (*fun) (dest, XVECEXP (x, 0, i));
  473.         }
  474.     }
  475.     }
  476. }
  477.  
  478. /* Return nonzero if register REG's old contents don't survive after INSN.
  479.    This can be because REG dies in INSN or because INSN entirely sets REG.
  480.  
  481.    "Entirely set" means set directly and not through a SUBREG,
  482.    ZERO_EXTRACT or SIGN_EXTRACT, so no trace of the old contents remains.
  483.  
  484.    REG may be a hard or pseudo reg.  Renumbering is not taken into account,
  485.    but for this use that makes no difference, since regs don't overlap
  486.    during their lifetimes.  Therefore, this function may be used
  487.    at any time after deaths have been computed (in flow.c).  */
  488.  
  489. int
  490. dead_or_set_p (insn, reg)
  491.      rtx insn;
  492.      rtx reg;
  493. {
  494.   register rtx link;
  495.   register int regno = REGNO (reg);
  496.  
  497.   for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
  498.     if ((REG_NOTE_KIND (link) == REG_DEAD
  499.      || REG_NOTE_KIND (link) == REG_INC)
  500.     && REGNO (XEXP (link, 0)) == regno)
  501.       return 1;
  502.  
  503.   if (GET_CODE (PATTERN (insn)) == SET)
  504.     return SET_DEST (PATTERN (insn)) == reg;
  505.   else if (GET_CODE (PATTERN (insn)) == PARALLEL)
  506.     {
  507.       register int i;
  508.       for (i = XVECLEN (PATTERN (insn), 0) - 1; i >= 0; i--)
  509.     {
  510.       if (GET_CODE (XVECEXP (PATTERN (insn), 0, i)) == SET
  511.           && SET_DEST (XVECEXP (PATTERN (insn), 0, i)) == reg)
  512.         return 1;
  513.     }
  514.     }
  515.   return 0;
  516. }
  517.  
  518. /* Return the reg-note of kind KIND in insn INSN, if there is one.
  519.    If DATUM is nonzero, look for one whose datum is DATUM.  */
  520.  
  521. rtx
  522. find_reg_note (insn, kind, datum)
  523.      rtx insn;
  524.      enum reg_note kind;
  525.      rtx datum;
  526. {
  527.   register rtx link;
  528.  
  529.   for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
  530.     if (REG_NOTE_KIND (link) == kind
  531.     && (datum == 0 || datum == XEXP (link, 0)))
  532.       return link;
  533.   return 0;
  534. }
  535.  
  536. /* Return the reg-note of kind KIND in insn INSN which applies to register
  537.    number REGNO, if any.  Return 0 if there is no such reg-note.  */
  538.  
  539. rtx
  540. find_regno_note (insn, kind, regno)
  541.      rtx insn;
  542.      enum reg_note kind;
  543.      int regno;
  544. {
  545.   register rtx link;
  546.  
  547.   for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
  548.     if (REG_NOTE_KIND (link) == kind
  549.     && REGNO (XEXP (link, 0)) == regno)
  550.       return link;
  551.   return 0;
  552. }
  553.  
  554. /* Nonzero if FROM precedes TO with no intervening labels.  */
  555.  
  556. int
  557. no_labels_between (from, to)
  558.      register rtx from, to;
  559. {
  560.   register rtx p = to;
  561.  
  562.   while (1)
  563.     {
  564.       p = PREV_INSN (p);
  565.       if (p == 0)
  566.     return 0;
  567.       if (p == from)
  568.     return 1;
  569.       if (GET_CODE (p) == CODE_LABEL)
  570.     return 0;
  571.     }
  572. }
  573.  
  574. /* Nonzero if X contains any volatile memory references
  575.    or volatile ASM_OPERANDS expressions.  */
  576.  
  577. int
  578. volatile_refs_p (x)
  579.      rtx x;
  580. {
  581.   register RTX_CODE code;
  582.  
  583.   code = GET_CODE (x);
  584.   switch (code)
  585.     {
  586.     case LABEL_REF:
  587.     case SYMBOL_REF:
  588.     case CONST_INT:
  589.     case CONST:
  590.     case CONST_DOUBLE:
  591.     case CC0:
  592.     case PC:
  593.     case REG:
  594.     case CLOBBER:
  595.     case ASM_INPUT:
  596.     case ADDR_VEC:
  597.     case ADDR_DIFF_VEC:
  598.       return 0;
  599.  
  600.     case CALL:
  601.       return 1;
  602.  
  603.     case MEM:
  604.     case ASM_OPERANDS:
  605.       if (MEM_VOLATILE_P (x))
  606.     return 1;
  607.     }
  608.  
  609.   /* Recursively scan the operands of this expression.  */
  610.  
  611.   {
  612.     register char *fmt = GET_RTX_FORMAT (code);
  613.     register int i;
  614.     
  615.     for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
  616.       {
  617.     if (fmt[i] == 'e')
  618.       {
  619.         if (volatile_refs_p (XEXP (x, i)))
  620.           return 1;
  621.       }
  622.     if (fmt[i] == 'E')
  623.       {
  624.         register int j;
  625.         for (j = 0; j < XVECLEN (x, i); j++)
  626.           if (volatile_refs_p (XVECEXP (x, i, j)))
  627.         return 1;
  628.       }
  629.       }
  630.   }
  631.   return 0;
  632. }
  633.  
  634. /* Return nonzero if evaluating rtx X might cause a trap.  */
  635.  
  636. int
  637. may_trap_p (x)
  638.      rtx x;
  639. {
  640.   int i;
  641.   enum rtx_code code;
  642.   char *fmt;
  643.  
  644.   if (x == 0)
  645.     return 0;
  646.   code = GET_CODE (x);
  647.   switch (code)
  648.     {
  649.       /* Handle these cases fast.  */
  650.     case CONST_INT:
  651.     case CONST_DOUBLE:
  652.     case SYMBOL_REF:
  653.     case LABEL_REF:
  654.     case CONST:
  655.     case PC:
  656.     case CC0:
  657.     case REG:
  658.       return 0;
  659.  
  660.       /* Memory ref can trap unless it's a static var or a stack slot.  */
  661.     case MEM:
  662.       return rtx_varies_p (XEXP (x, 0));
  663.  
  664.       /* Division by a non-constant might trap.  */
  665.     case DIV:
  666.     case MOD:
  667.     case UDIV:
  668.     case UMOD:
  669.       if (! CONSTANT_P (XEXP (x, 1))
  670.       && GET_CODE (XEXP (x, 1)) != CONST_DOUBLE)
  671.     return 1;
  672.       if (XEXP (x, 1) == const0_rtx)
  673.     return 1;
  674.     default:
  675.       /* Any floating arithmetic may trap.  */
  676.       if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT)
  677.     return 1;
  678.     }
  679.  
  680.   fmt = GET_RTX_FORMAT (code);
  681.   for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
  682.     {
  683.       if (fmt[i] == 'e')
  684.     {
  685.       if (may_trap_p (XEXP (x, i)))
  686.         return 1;
  687.     }
  688.       else if (fmt[i] == 'E')
  689.     {
  690.       register int j;
  691.       for (j = 0; j < XVECLEN (x, i); j++)
  692.         if (may_trap_p (XVECEXP (x, i, j)))
  693.           return 1;
  694.     }
  695.     }
  696.   return 0;
  697. }
  698.